home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Direct Blitting in C++ / Blitting.sit / Blitting ƒ / CDirectBlit.h < prev    next >
Text File  |  1995-04-16  |  1KB  |  45 lines

  1. // CDirectBlit.h, the CDirectBlit class definition
  2. //
  3. // Copyright ⌐ 1995, Macneil Shonle. All rights reserved.
  4.  
  5. #ifndef __CDIRECTBLIT__
  6. #define __CDIRECTBLIT__
  7.  
  8. #ifndef __PIXELTYPES__
  9. #include <PixelTypes.h>
  10. #endif
  11.  
  12. class CDirectBlit {
  13. public:
  14.     PixelPtr GetBaseAddress();
  15.     RowWidth GetRowBytes();
  16.     
  17.     RowWidth GetWidth();
  18.     ColumnHeight GetHeight();
  19.     Rect* GetBounds();                        // get global bounds
  20.     Rect* GetPortRect();                    // get local bounds
  21.     CGrafPtr GetMacPort();
  22.     GDHandle GetMacDevice();
  23.     BitMap* GetBitMap();                    // BitMap to use for CopyBits parameter
  24.     
  25.     BitDepth GetBitDepth();
  26.     int Use32Bit();                            // addressing mode to use for pixel access
  27.     
  28.     PixelPtr GetAddressOfRow( PixelCoordinate theRow );
  29.     PixelPtr GetAddressOfPixel( PixelCoordinate h, PixelCoordinate v );
  30.     
  31. protected:
  32.     PixelPtr mBaseAddress;
  33.     RowWidth mRowBytes;
  34.     PixelPtr *mRowAddresses;        // quick row array
  35.     Rect mBounds;
  36.     BitDepth mBitDepth;
  37.     CGrafPtr mPort;
  38.     GDHandle mGDevice;
  39.     SInt8 mAddressingMode;
  40.     
  41.     void BuildQuickRow();
  42.     void DestroyQuickRow();
  43. };
  44.  
  45. #endif